package 对象操作流;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

public class demo2 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {

        ObjectInputStream ois = new ObjectInputStream(new FileInputStream("a.txt"));

        Object obj = ois.readObject();

        User s = (User) obj;
        System.out.println(s.getPassword() + "," + s.getUesrname());

        ois.close();
    }
}
